import request from '@/utils/request'

//角色列表
export function role(params) {
  return request({
    url: '/role',
    method: 'get',
    params
  })
}
//编辑角色-保存数据
export function updateRole(data) {
  return request({
    url: '/role/update',
    method: 'post',
    data
  })
}
//角色状态变更
export function status(data) {
  return request({
    url: '/role/status',
    method: 'post',
    data
  })
}
//添加角色-保存数据
export function create(data) {
  return request({
    url: '/role/create',
    method: 'post',
    data
  })
}
//角色详情
export function detail(data) {
  return request({
    url: '/role/detail',
    method: 'get',
    params: data
  })
}
//复制角色-保存数据
export function copyAdd(data) {
  return request({
    url: '/role/copy',
    method: 'post',
    data
  })
}
//删除角色
export function deleteR(data) {
  return request({
    url: '/role/delete',
    method: 'post',
    data
  })
}
//人员管理-获取数据
export function getUsersList(data) {
  return request({
    url: '/role/get-users',
    method: 'get',
    params: data
  })
}
//人员管理-保存数据
export function setUser(data) {
  return request({
    url: '/role/set-users',
    method: 'post',
    data
  })
}

//角色日志
export function getRoleLog(data) {
  return request({
    url: '/role/oplog',
    method: 'get',
    params: data
  })
}






